Implementing Dynamic Language Features in Java Using Dynamic Code Generation

نویسنده

  • Thomas M. Breuel
چکیده

Compared to dynamic object-oriented languages like CommonLisp or Smalltalk, Java has a fairly simple and restrictive object and type system. Some of the key differences between Java and these other languages is that they offer structural conformance, automatic delegation, and dynamic mixins. When such constructs are needed in a language like Java, they are usually expressed in terms of standard object-oriented design patterns, requiring the manual implementation of “glue” or “helper” classes. This paper describes ways in which such features can be provided efficiently and automatically in terms of Java’s platform-independent binary format and dynamic loading mechanisms. The implementation does not require any changes to the Java runtime, bytecodes, or class loader and yields performance comparable to manually implemented design patterns. The approach should prove useful both as a programming tool for Java and as an strategy for building efficient implementations of dynamic languages on top of the Java virtual machine.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

DynJava: Type Safe Dynamic Code Generation in Java

Dynamic code generation is a technique that generates and executes fragments of executable code during the run-time of an program to reduce the execution time of programs. However, most of currently available dynamic code generation systems have weakness on high-level language support for describing dynamic code fragment. Especially, safety of dynamic composition of code fragments is not suffic...

متن کامل

Implementation of the Dynamic Behavior of Object Oriented System

Object oriented methodologies such as Object Modeling Technique (OMT), suggest to create different models of a system indicative of its static structure and dynamic behavior. Converting the static structure (usually represented as an ER-style diagram) into implementation code is already much understood. On the contrary, implementing the dynamic behavior is rather less understood and is consider...

متن کامل

Byte Code Engineering

The term “Java” is used to denote two different concepts: the language itself and the related execution environment, the Java Virtual Machine (JVM), which executes byte code instructions. Several research projects deal with byte code-generating compilers or the implementation of new features via byte code transformations. Examples are code optimization, the implementation of parameterized types...

متن کامل

How can hardware support Just-In-Time compilation?

Just-In-Time (JIT) compiler is an e cient and preferred style of implementing the Java Virtual Machine (JVM) on resource-rich machines. Using a JIT compiler, the bytecodes are translated to native code at runtime. In this paper, we investigate where the time is spent in such dynamic compilers and how well a smart JIT compiler can do. Next, we propose architectural mechanisms that can be used to...

متن کامل

Code Generation from Uml Statecharts

The Unified Modeling Language (UML) statechart diagram is a powerful tool for specifying the dynamic behavior of reactive objects. Generating code from statechart diagrams is a challenging task due to its dynamic nature and because many of the statechart concepts are not supported by the object oriented programming languages. Most of the approaches for implementing UML statecharts diagram eithe...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2001